home *** CD-ROM | disk | FTP | other *** search
- /*
-
- GHEL v1.2
-
- Programed by Keijiro Takahashi (novice)
-
- */
-
-
- #include <stdio.h>
- #include <stdlib.h>
- #include <string.h>
- #include <winb.h>
- #include <te.h>
- #include <fntb.h>
- #include <gui.h>
- #include <egb.h>
- #include <file_dlg.h>
- #include <guidbg.h>
- #include <eintm.h>
- #include "type.h"
-
-
-
- extern MMIINIT initDataALRT ;
- extern MMIINIT initDataBASE ;
- extern hel helbuf;
-
- int APL_init();
-
- char *guiEgbPtr ;
-
-
-
-
- /*
-
- Main
-
- */
- void main()
- {
- if(APL_init()==NOERR)
- {
- MMI_ExecSystem();
- }
- TL_free(helbuf.buf);
- FDG_FreeFileDlg();
- FDG_RecovCurDir();
- MMI_Close();
- }
-
-
-
-
- /*
-
- Initialize
-
- */
- int APL_init()
- {
-
- int ret ;
- MMICTRL mmi;
-
- mmi.page0=SCREEN16 | SCREENIGNORE;
- mmi.page1=SCREENUNUSED;
- mmi.writePage=0;
- mmi.displayPage=SCREENAVAILABLE;
- mmi.priority=0;
- mmi.mode=SCREENAVAILABLE;
- mmi.width=SCREENEXPAND;
- mmi.move.lupx=-16384;
- mmi.move.lupy=-16384;
- mmi.move.rdwx=16383;
- mmi.move.rdwy=16383;
- mmi.white=15;
- mmi.black=8;
- mmi.gray=7;
- mmi.xor=7;
- mmi.size=0;
- mmi.ptr=NULL;
- mmi.asize=0;
- mmi.aptr=NULL;
-
- if ((ret = MMI_Open(&mmi)) != NOERR) return ret ;
-
- if ((ret = MMI_initHyper()) < 0) return ret ;
- if ((ret = MMI_initDialogL40()) < 0) return ret ;
- if ((ret = MMI_initAlertL40()) < 0) return ret ;
- if ((ret = MMI_initWindowL40()) < 0) return ret ;
- if ((ret = MMI_initMessageL40()) < 0) return ret ;
- if ((ret = MMI_initButtonL40()) < 0) return ret ;
- if ((ret = MMI_initDrawButtonL40()) < 0) return ret ;
- if ((ret = MMI_initIconL40()) < 0) return ret ;
- if ((ret = MMI_initScrollBarL40()) < 0) return ret ;
- if ((ret = MMI_initTextL40()) < 0) return ret ;
- if ((ret = MMI_initListMenuL40()) < 0) return ret ;
- if ((ret = MMI_initNumBoxL40()) < 0) return ret ;
-
- if ((ret = MMI_Init(&initDataALRT)) < 0) return ret ;
- if ((ret = MMI_Init(&initDataBASE)) < 0) return ret ;
-
-
- guiEgbPtr = MMI_GetEgbPtr();
- EIN_initGuiColor();
-
- FDG_SaveCurDir();
-
- if( (ret=FDG_InitFileDlg()) < 0 )
- {
- return(ret);
- }
-
- extern int shell();
- MMI_SendMessage(MMI_GetBaseObj(),MM_SETEXEC,1,shell);
- MMI_CallMessage(MMI_GetApliId(),GM_TITLE,
- (int)"GHEL v1.2 By Keijiro",0);
-
-
- extern char pageStr[];
- extern int pageMsg;
- MMI_SendMessage(pageMsg,MM_SETMSG,1,pageStr);
-
- extern int baseWin;
- WINCTRL *pctrl;
- MMI_GetControl(&pctrl);
- MMI_SendMessage(baseWin,MM_MOVE,2,
- (pctrl->bound.rdwx-170)/2,(pctrl->bound.rdwy-226)/2);
-
-
- MMI_SendMessage(MMI_GetBaseObj(),MM_SHOW,0);
-
- extern void idleTask();
- MMI_SetIdleTaskFunc(idleTask);
-
- return NOERR ;
- }
-